import request from '@/utils/request'
import { data } from 'autoprefixer'

export function menuList({ name, pageNum, pageSize }) {
  const data = { name, pageNum, pageSize }
  console.log(data)
  return request({
    url: '/menu/list',
    method: 'post',
    data
  })
}

export function menuTree() {
  return request({
    url: '/menu/tree',
    method: 'get'
  })
}

export function menuSave(data) {
  return request({
    url: '/menu/createOrUpdate',
    method: 'post',
    data
  })
}

export function menuDetail() {
  return request({
    url: '/menu/view',
    method: 'post'
  })
}

export function menuDelete(ids) {
  return request({
    url: '/menu/delete',
    method: 'post',
    data: { ids }
  })
}
